home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Unix / getit.shar / getumich < prev    next >
Encoding:
Text File  |  1993-07-26  |  779 b   |  27 lines

  1. #!/bin/sh
  2. host=mac.archive.umich.edu 
  3. in=umich.files
  4. out=$host.results
  5. err=$host.errs
  6. # How long to sleep between subsequent tries (in seconds):
  7. #time=5        # Downright Nasty :-(
  8. time=59        # One minute
  9. #time=559    # Ten minutes
  10. #time=3559    # An hour
  11. #time=7159    # Two hours
  12. echo "Starting to get files from $host." > $out
  13. echo "Trying to reach $host at time:" >> $out
  14. date +'%H:%M hrs; %d %h %y' >> $out
  15. ftp $host < $in >> $out 2> $err
  16. while test -s $err
  17. do
  18.   echo "Cannot connect now, will try again in $time seconds." >> $out
  19.   sleep $time
  20.   echo "Trying to reach $host at time:" >> $out
  21.   date +'%H:%M hrs; %d %h %y' >> $out
  22.   ftp $host < $in >> $out 2> $err
  23. done
  24. echo "File transfer successful!" >> $out
  25. echo "File transfer completed at:" >> $out
  26. date +'%H:%M hrs; %d %h %y' >> $out
  27.